home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / contrib / germbib / bst / gerunsrt.bst < prev   
Text File  |  1993-04-20  |  21KB  |  1,060 lines

  1. % BibTeX standard bibliography style `plain'
  2.         % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
  3.         % Copyright (C) 1985, all rights reserved.
  4.         % Copying of this file is authorized only if either
  5.         % (1) you make absolutely no changes to your copy, including name, or
  6.         % (2) if you do make changes, you name it something other than
  7.         % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
  8.         % This restriction helps ensure that all standard styles are identical.
  9.         % The file btxbst.doc has the documentation for this style.
  10. %   15-feb-92   (MW)    Updated for use with `bibgerman.sty': things like "and"
  11. %                       change with the language. Switch the language using the
  12. %                       language field: 
  13. %                          language = "german" | "USenglish" | "english"
  14. %                       Then a `\selectlanguage{...}' command will be pushed just
  15. %                       before the `\bibitem...' command for the entry in work.
  16.  
  17. ENTRY
  18.   { address
  19.     author
  20.     booktitle
  21.     chapter
  22.     edition
  23.     editor
  24.     howpublished
  25.     institution
  26.     journal
  27.     key
  28.     language
  29.     month
  30.     note
  31.     number
  32.     organization
  33.     pages
  34.     publisher
  35.     school
  36.     series
  37.     title
  38.     type
  39.     volume
  40.     year
  41.   }
  42.   {}
  43.   { label }
  44.  
  45. INTEGERS { output.state before.all mid.sentence after.sentence after.block before.title }
  46.  
  47. STRINGS { s t language.state language.temp }
  48.  
  49. FUNCTION {init.state.consts}
  50. { #0 'before.all :=
  51.   #1 'mid.sentence :=
  52.   #2 'after.sentence :=
  53.   #3 'after.block :=
  54.   #4 'before.title :=
  55.   "nostate" 'language.state :=
  56. }
  57.  
  58. FUNCTION {language.state.test}
  59.   'language.temp :=
  60.   language.temp language.state =
  61.     { #1 }
  62.     { #0 }
  63.   if$
  64. }
  65.  
  66.  
  67. FUNCTION {not}
  68. {   { #0 }
  69.     { #1 }
  70.   if$
  71. }
  72.  
  73. FUNCTION {and}
  74. {   'skip$
  75.     { pop$ #0 }
  76.   if$
  77. }
  78.  
  79. FUNCTION {or}
  80. {   { pop$ #1 }
  81.     'skip$
  82.   if$
  83. }
  84.  
  85. FUNCTION {output.nonnull}
  86. { 's :=
  87.   output.state mid.sentence =
  88.     { ", " * write$ }
  89.     { output.state after.block =
  90.         { add.period$ write$
  91.           newline$
  92.           "\newblock " write$
  93.         }
  94.         { output.state before.all =
  95.             'write$
  96.             % next if is for use with `new' FUNCTION {after.authors}
  97.             { output.state before.title =
  98.                 { ": " * write$ }
  99.                 { add.period$ " " * write$ }
  100.               if$
  101.             }
  102.           if$
  103.         }
  104.       if$
  105.       mid.sentence 'output.state :=
  106.     }
  107.   if$
  108.   s
  109. }
  110.  
  111. FUNCTION {output}
  112. { duplicate$ empty$
  113.     'pop$
  114.     'output.nonnull
  115.   if$
  116. }
  117.  
  118. FUNCTION {output.check}
  119. { 't :=
  120.   duplicate$ empty$
  121.     { pop$ "empty " t * " in " * cite$ * warning$ }
  122.     'output.nonnull
  123.   if$
  124. }
  125.  
  126. FUNCTION {output.bibitem}
  127. { newline$
  128.   language empty$
  129.     'skip$
  130.     { language.state language =
  131.         'skip$
  132.         { "\selectlanguage{\" language * "}" * write$
  133.           newline$
  134.         }
  135.       if$
  136.       language 'language.state :=
  137.     }
  138.   if$
  139.   "\bibitem{" write$
  140.   cite$ write$
  141.   "}" write$
  142.   newline$
  143.   ""
  144.   before.all 'output.state :=
  145. }
  146.  
  147. FUNCTION {fin.entry}
  148. { add.period$
  149.   write$
  150.   newline$
  151. }
  152.  
  153. FUNCTION {new.block}
  154. { output.state before.all =
  155.     'skip$
  156.     { after.block 'output.state := }
  157.   if$
  158. }
  159.  
  160. FUNCTION {new.sentence}
  161. { output.state after.block =
  162.     'skip$
  163.     { output.state before.all =
  164.         'skip$
  165.         { after.sentence 'output.state := }
  166.       if$
  167.     }
  168.   if$
  169. }
  170.  
  171. % new one -> sets what is specified in FUNCTION {output.nonnull}
  172. % if `before.title 'output.state = ... if$' is true
  173. FUNCTION {after.authors}
  174. { output.state before.all =
  175.     'skip$
  176.     { before.title 'output.state := }
  177.   if$
  178. }
  179.  
  180. FUNCTION {new.block.checka}
  181. { empty$
  182.     'skip$
  183.     'new.block
  184.   if$
  185. }
  186.  
  187. FUNCTION {new.block.checkb}
  188. { empty$
  189.   swap$ empty$
  190.   and
  191.     'skip$
  192.     'new.block
  193.   if$
  194. }
  195.  
  196. FUNCTION {new.block.checkc}
  197. { empty$
  198.   swap$ empty$
  199.   and
  200.     'skip$
  201.     'after.authors
  202.   if$
  203. }
  204.  
  205. FUNCTION {new.sentence.checka}
  206. { empty$
  207.     'skip$
  208.     'new.sentence
  209.   if$
  210. }
  211.  
  212. FUNCTION {new.sentence.checkb}
  213. { empty$
  214.   swap$ empty$
  215.   and
  216.     'skip$
  217.     'new.sentence
  218.   if$
  219. }
  220.  
  221. FUNCTION {field.or.null}
  222. { duplicate$ empty$
  223.     { pop$ "" }
  224.     'skip$
  225.   if$
  226. }
  227.  
  228. FUNCTION {emphasize}
  229. { duplicate$ empty$
  230.     { pop$ "" }
  231.     { "{\em " swap$ * "}" * }
  232.   if$
  233. }
  234.  
  235. FUNCTION {smallcaps}
  236. { duplicate$ empty$
  237.     { pop$ "" }
  238.     { "{\sc " swap$ * "}" * }
  239.   if$
  240. }
  241.  
  242. INTEGERS { nameptr namesleft numnames }
  243.  
  244. FUNCTION {format.names}
  245. { 's :=
  246.   #1 'nameptr :=
  247.   s num.names$ 'numnames :=
  248.   numnames 'namesleft :=
  249.     { namesleft #0 > }
  250.     { nameptr #1 >
  251.         { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ smallcaps 't :=
  252.           namesleft #1 >
  253.             { ", " * t * }
  254.             { numnames #2 >
  255.                 { "english" language.state.test
  256.                   "USenglish" language.state.test
  257.                   or
  258.                      {"," * }
  259.                      'skip$
  260.                   if$
  261.                 }
  262.                 'skip$
  263.               if$
  264.               t "others" =
  265.                 { " \btxetalshort{.}" * }
  266.                 { " \btxandlong{}\ " * t * }
  267.               if$
  268.             }
  269.           if$
  270.         }
  271.         { s nameptr "{ll}{, jj}{, ff}{~vv}" format.name$ smallcaps }
  272.       if$
  273.       nameptr #1 + 'nameptr :=
  274.       namesleft #1 - 'namesleft :=
  275.     }
  276.   while$
  277. }
  278.  
  279. FUNCTION {format.authors}
  280. { author empty$
  281.     { "" }
  282.     { author format.names }
  283.   if$
  284. }
  285.  
  286. FUNCTION {format.editors}
  287. { editor empty$
  288.     { "" }
  289.     { editor format.names
  290.       editor num.names$ #1 >
  291.         { "\ (\btxeditorslong{})" * }
  292.         { "\ (\btxeditorlong{})" * }
  293.       if$
  294.     }
  295.   if$
  296. }
  297.  
  298. FUNCTION {format.title}
  299. { title empty$
  300.     { "" }
  301.     { "english" language.state.test
  302.       "USenglish" language.state.test
  303.       or
  304.         { title "t" change.case$ emphasize }
  305.         { title emphasize }
  306.       if$
  307.     }
  308.   if$
  309. }
  310.  
  311. FUNCTION {n.dashify}
  312. { 't :=
  313.   ""
  314.     { t empty$ not }
  315.     { t #1 #1 substring$ "-" =
  316.         { t #1 #2 substring$ "--" = not
  317.             { "--" *
  318.               t #2 global.max$ substring$ 't :=
  319.             }
  320.             {   { t #1 #1 substring$ "-" = }
  321.                 { "-" *
  322.                   t #2 global.max$ substring$ 't :=
  323.                 }
  324.               while$
  325.             }
  326.           if$
  327.         }
  328.         { t #1 #1 substring$ *
  329.           t #2 global.max$ substring$ 't :=
  330.         }
  331.       if$
  332.     }
  333.   while$
  334. }
  335.  
  336. FUNCTION {format.date}
  337. { year empty$
  338.     { month empty$
  339.         { "" }
  340.         { "there's a month but no year in " cite$ * warning$
  341.           month
  342.         }
  343.       if$
  344.     }
  345.     { month empty$
  346.         'year
  347.         { month " " * year * }
  348.       if$
  349.     }
  350.   if$
  351. }
  352.  
  353. FUNCTION {format.btitle}
  354. { title emphasize
  355. }
  356.  
  357. FUNCTION {tie.or.space.connect}
  358. { duplicate$ text.length$ #3 <
  359.     { "~" }
  360.     { "\ " }
  361.   if$
  362.   swap$ * *
  363. }
  364.  
  365. FUNCTION {either.or.check}
  366. { empty$
  367.     'pop$
  368.     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  369.   if$
  370. }
  371.  
  372. FUNCTION {format.bvolume}
  373. { volume empty$
  374.     { "" }
  375.     { output.state after.block =
  376.         { "\Btxvolumelong{}" }
  377.         { "\btxvolumelong{}" }
  378.       if$
  379.       volume tie.or.space.connect
  380.       series empty$
  381.         'skip$
  382.         { " \btxofserieslong{}\ " * series emphasize * }
  383.       if$
  384.       "volume and number" number either.or.check
  385.     }
  386.   if$
  387. }
  388.  
  389. FUNCTION {format.number.series}
  390. { volume empty$
  391.     { number empty$
  392.         { series field.or.null }
  393.         { output.state mid.sentence =
  394.             { "\btxnumberlong{}" }
  395.             { "\Btxnumberlong{}" }
  396.           if$
  397.           number tie.or.space.connect
  398.           series empty$
  399.             { "there's a number but no series in " cite$ * warning$ }
  400.             { " \btxinserieslong{}\ " * series emphasize * }
  401.           if$
  402.         }
  403.       if$
  404.     }
  405.     { "" }
  406.   if$
  407. }
  408.  
  409. FUNCTION {format.edition}
  410. { edition empty$
  411.     { "" }
  412.     { "english" language.state.test
  413.       "USenglish" language.state.test
  414.       or
  415.         { output.state mid.sentence =
  416.             { edition "l" change.case$ " \btxeditionlong{}" * }
  417.             { edition "t" change.case$ " \btxeditionlong{}" * }
  418.           if$
  419.         }
  420.         { edition " \btxeditionlong{}" * }
  421.       if$
  422.     }
  423.   if$
  424. }
  425.  
  426. INTEGERS { multiresult }
  427.  
  428. FUNCTION {multi.page.check}
  429. { 't :=
  430.   #0 'multiresult :=
  431.     { multiresult not
  432.       t empty$ not
  433.       and
  434.     }
  435.     { t #1 #1 substring$
  436.       duplicate$ "-" =
  437.       swap$ duplicate$ "," =
  438.       swap$ "+" =
  439.       or or
  440.         { #1 'multiresult := }
  441.         { t #2 global.max$ substring$ 't := }
  442.       if$
  443.     }
  444.   while$
  445.   multiresult
  446. }
  447.  
  448. FUNCTION {format.pages}
  449. { pages empty$
  450.     { "" }
  451.     { pages multi.page.check
  452.         { "\btxpageslong{}" pages n.dashify tie.or.space.connect }
  453.         { "\btxpagelong{}" pages tie.or.space.connect }
  454.       if$
  455.     }
  456.   if$
  457. }
  458.  
  459. FUNCTION {format.vol.num.pages}
  460. { volume field.or.null
  461.   number empty$
  462.     'skip$
  463.     { "(" number * ")" * *
  464.       volume empty$
  465.         { "there's a number but no volume in " cite$ * warning$ }
  466.         'skip$
  467.       if$
  468.     }
  469.   if$
  470.   pages empty$
  471.     'skip$
  472.     { duplicate$ empty$
  473.         { pop$ format.pages }
  474.         { ":" * pages n.dashify * }
  475.       if$
  476.     }
  477.   if$
  478. }
  479.  
  480. FUNCTION {format.chapter.pages}
  481. { chapter empty$
  482.     'format.pages
  483.     { type empty$
  484.         { "\btxchapterlong{}" }
  485.         { "english" language.state.test
  486.           "USenglish" language.state.test
  487.           or
  488.              { type "l" change.case$ }
  489.              { type }
  490.          if$
  491.         }
  492.       if$
  493.       chapter tie.or.space.connect
  494.       pages empty$
  495.         'skip$
  496.         { ", " * format.pages * }
  497.       if$
  498.     }
  499.   if$
  500. }
  501.  
  502. FUNCTION {format.in.ed.booktitle}
  503. { booktitle empty$
  504.     { "" }
  505.     { editor empty$
  506.         { "\Btxinlong{}\ " booktitle emphasize * }
  507.         { "\Btxinlong{}\ " format.editors * ": " * booktitle emphasize * }
  508.       if$
  509.     }
  510.   if$
  511. }
  512.  
  513. FUNCTION {empty.misc.check}
  514. { author empty$ title empty$ howpublished empty$
  515.   month empty$ year empty$ note empty$
  516.   and and and and and
  517.     { "all relevant fields are empty in " cite$ * warning$ }
  518.     'skip$
  519.   if$
  520. }
  521.  
  522. FUNCTION {format.thesis.type}
  523. { type empty$
  524.     'skip$
  525.     { pop$
  526.       "english" language.state.test
  527.       "USenglish" language.state.test
  528.       or
  529.         { type "t" change.case$ }
  530.         { type }
  531.       if$
  532.     }
  533.   if$
  534. }
  535.  
  536. FUNCTION {format.tr.number}
  537. { type empty$
  538.     { "\Btxtechreplong{}" }
  539.     'type
  540.   if$
  541.   number empty$
  542.     { "english" language.state.test
  543.       "USenglish" language.state.test
  544.       or
  545.         { type empty$
  546.             { pop$ "\btxtechreplong{}" }
  547.             { "t" change.case$ }
  548.           if$
  549.         }
  550.         'skip$
  551.       if$
  552.     }
  553.     { number tie.or.space.connect }
  554.   if$
  555. }
  556.  
  557. FUNCTION {format.article.crossref}
  558. { key empty$
  559.     { journal empty$
  560.         { "need key or journal for " cite$ * " to crossref " * crossref *
  561.           warning$
  562.           ""
  563.         }
  564.         { "\Btxinlong{}\ " journal emphasize * }
  565.       if$
  566.     }
  567.     { "\Btxinlong{}\ " key emphasize * }
  568.   if$
  569.   " \cite{" * crossref * "}" *
  570. }
  571.  
  572. FUNCTION {format.crossref.editor}
  573. { editor #1 "{ll}{, jj}{, ff}{~vv}" format.name$ smallcaps
  574.   editor num.names$ duplicate$
  575.   #2 >
  576.     { pop$ " \btxetalshort{.}" * }
  577.     { #2 <
  578.         'skip$
  579.         { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  580.             { " \btxetalshort{.}" * }
  581.             { " \btxandlong{}\ " * editor #2 "{ff}{~vv}{~ll}{, jj}" format.name$ smallcaps * }
  582.           if$
  583.         }
  584.       if$
  585.     }
  586.   if$
  587. }
  588.  
  589. FUNCTION {format.book.crossref}
  590. { volume empty$
  591.     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  592.       "\Btxinlong{}\ "
  593.     }
  594.     { "\Btxvolumelong{}" volume tie.or.space.connect
  595.       " \btxofserieslong{}\ " *
  596.     }
  597.   if$
  598.   editor empty$
  599.   editor field.or.null author field.or.null =
  600.   or
  601.     { key empty$
  602.         { series empty$
  603.             { "need editor, key, or series for " cite$ * " to crossref " *
  604.               crossref * warning$
  605.               "" *
  606.             }
  607.             { series emphasize * }
  608.           if$
  609.         }
  610.         { key emphasize * }
  611.       if$
  612.     }
  613.     { format.crossref.editor * }
  614.   if$
  615.   " \cite{" * crossref * "}" *
  616. }
  617.  
  618. FUNCTION {format.incoll.inproc.crossref}
  619. { editor empty$
  620.   editor field.or.null author field.or.null =
  621.   or
  622.     { key empty$
  623.         { booktitle empty$
  624.             { "need editor, key, or booktitle for " cite$ * " to crossref " *
  625.               crossref * warning$
  626.               ""
  627.             }
  628.             { "\Btxinlong{}\ " booktitle emphasize * }
  629.           if$
  630.         }
  631.         { "\Btxinlong{}\ " key emphasize * }
  632.       if$
  633.     }
  634.     { "\Btxinlong{}\ " format.crossref.editor * }
  635.   if$
  636.   " \cite{" * crossref * "}" *
  637. }
  638.  
  639. FUNCTION {article}
  640. { output.bibitem
  641.   format.authors "author" output.check
  642.   after.authors
  643.   format.title "title" output.check
  644.   new.block
  645.   crossref missing$
  646.     { journal 
  647.       title missing$
  648.         { emphasize }
  649.         'skip$
  650.       if$
  651.       "journal" output.check 
  652.       format.vol.num.pages output
  653.       format.date "year" output.check
  654.     }
  655.     { format.article.crossref output.nonnull
  656.       format.pages output
  657.     }
  658.   if$
  659.   new.block
  660.   note output
  661.   fin.entry
  662. }
  663.  
  664. FUNCTION {book}
  665. { output.bibitem
  666.   author empty$
  667.     { format.editors "author and editor" output.check }
  668.     { format.authors output.nonnull
  669.       crossref missing$
  670.         { "author and editor" editor either.or.check }
  671.         'skip$
  672.       if$
  673.     }
  674.   if$
  675.   after.authors
  676.   format.btitle "title" output.check
  677.   crossref missing$
  678.     { format.bvolume output
  679.       new.block
  680.       format.number.series output
  681.       new.sentence
  682.       publisher "publisher" output.check
  683.       address output
  684.     }
  685.     { new.block
  686.       format.book.crossref output.nonnull
  687.     }
  688.   if$
  689.   format.edition output
  690.   format.date "year" output.check
  691.   new.block
  692.   note output
  693.   fin.entry
  694. }
  695.  
  696. FUNCTION {booklet}
  697. { output.bibitem
  698.   format.authors output
  699.   after.authors
  700.   format.title "title" output.check
  701.   howpublished address new.block.checkb
  702.   howpublished output
  703.   address output
  704.   format.date output
  705.   new.block
  706.   note output
  707.   fin.entry
  708. }
  709.  
  710. FUNCTION {inbook}
  711. { output.bibitem
  712.   author empty$
  713.     { format.editors "author and editor" output.check }
  714.     { format.authors output.nonnull
  715.       crossref missing$
  716.         { "author and editor" editor either.or.check }
  717.         'skip$
  718.       if$
  719.     }
  720.   if$
  721.   after.authors
  722.   format.btitle "title" output.check
  723.   crossref missing$
  724.     { format.bvolume output
  725.       format.chapter.pages "chapter and pages" output.check
  726.       new.block
  727.       format.number.series output
  728.       new.sentence
  729.       publisher "publisher" output.check
  730.       address output
  731.     }
  732.     { format.chapter.pages "chapter and pages" output.check
  733.       new.block
  734.       format.book.crossref output.nonnull
  735.     }
  736.   if$
  737.   format.edition output
  738.   format.date "year" output.check
  739.   new.block
  740.   note output
  741.   fin.entry
  742. }
  743.  
  744. FUNCTION {incollection}
  745. { output.bibitem
  746.   format.authors "author" output.check
  747.   after.authors
  748.   format.title "title" output.check
  749.   new.block
  750.   crossref missing$
  751.     { format.in.ed.booktitle "booktitle" output.check
  752.       format.bvolume output
  753.       format.number.series output
  754.       format.chapter.pages output
  755.       new.sentence
  756.       publisher "publisher" output.check
  757.       address output
  758.       format.edition output
  759.       format.date "year" output.check
  760.     }
  761.     { format.incoll.inproc.crossref output.nonnull
  762.       format.chapter.pages output
  763.     }
  764.   if$
  765.   new.block
  766.   note output
  767.   fin.entry
  768. }
  769.  
  770. FUNCTION {inproceedings}
  771. { output.bibitem
  772.   format.authors "author" output.check
  773.   after.authors
  774.   format.title "title" output.check
  775.   new.block
  776.   crossref missing$
  777.     { format.in.ed.booktitle "booktitle" output.check
  778.       format.bvolume output
  779.       format.number.series output
  780.       format.pages output
  781.       address empty$
  782.         { organization publisher new.sentence.checkb
  783.           organization output
  784.           publisher output
  785.           format.date "year" output.check
  786.         }
  787.         { address output.nonnull
  788.           format.date "year" output.check
  789.           new.sentence
  790.           organization output
  791.           publisher output
  792.         }
  793.       if$
  794.     }
  795.     { format.incoll.inproc.crossref output.nonnull
  796.       format.pages output
  797.     }
  798.   if$
  799.   new.block
  800.   note output
  801.   fin.entry
  802. }
  803.  
  804. FUNCTION {conference} { inproceedings }
  805.  
  806. FUNCTION {manual}
  807. { output.bibitem
  808.   author empty$
  809.     { organization empty$
  810.         'skip$
  811.         { organization smallcaps output.nonnull
  812.           address output
  813.         }
  814.       if$
  815.     }
  816.     { format.authors output.nonnull }
  817.   if$
  818.   after.authors
  819.   format.btitle "title" output.check
  820.   author empty$
  821.     { organization empty$
  822.         { address new.block.checka
  823.           address output
  824.         }
  825.         'skip$
  826.       if$
  827.     }
  828.     { organization address new.block.checkb
  829.       organization output
  830.       address output
  831.     }
  832.   if$
  833.   format.edition output
  834.   format.date output
  835.   new.block
  836.   note output
  837.   fin.entry
  838. }
  839.  
  840. FUNCTION {mastersthesis}
  841. { output.bibitem
  842.   format.authors "author" output.check
  843.   after.authors
  844.   format.title "title" output.check
  845.   new.block
  846.   "\btxmastthesis{}" format.thesis.type output.nonnull
  847.   school "school" output.check
  848.   address output
  849.   format.date "year" output.check
  850.   new.block
  851.   note output
  852.   fin.entry
  853. }
  854.  
  855. FUNCTION {misc}
  856. { output.bibitem
  857.   format.authors output
  858.   title howpublished new.block.checkc
  859.   format.title output
  860.   howpublished new.block.checka
  861.   howpublished output
  862.   format.date output
  863.   new.block
  864.   note output
  865.   fin.entry
  866.   empty.misc.check
  867. }
  868.  
  869. FUNCTION {phdthesis}
  870. { output.bibitem
  871.   format.authors "author" output.check
  872.   after.authors
  873.   format.btitle "title" output.check
  874.   new.block
  875.   "\btxphdthesis{}" format.thesis.type output.nonnull
  876.   school "school" output.check
  877.   address output
  878.   format.date "year" output.check
  879.   new.block
  880.   note output
  881.   fin.entry
  882. }
  883.  
  884. FUNCTION {proceedings}
  885. { output.bibitem
  886.   editor empty$
  887.     { organization smallcaps output }
  888.     { format.editors output.nonnull }
  889.   if$
  890.   after.authors
  891.   format.btitle "title" output.check
  892.   format.bvolume output
  893.   format.number.series output
  894.   address empty$
  895.     { editor empty$
  896.         { publisher new.sentence.checka }
  897.         { organization publisher new.sentence.checkb
  898.           organization output
  899.         }
  900.       if$
  901.       publisher output
  902.       format.date "year" output.check
  903.     }
  904.     { address output.nonnull
  905.       format.date "year" output.check
  906.       new.sentence
  907.       editor empty$
  908.         'skip$
  909.         { organization output }
  910.       if$
  911.       publisher output
  912.     }
  913.   if$
  914.   new.block
  915.   note output
  916.   fin.entry
  917. }
  918.  
  919. FUNCTION {techreport}
  920. { output.bibitem
  921.   format.authors "author" output.check
  922.   after.authors
  923.   format.title "title" output.check
  924.   new.block
  925.   format.tr.number output.nonnull
  926.   institution "institution" output.check
  927.   address output
  928.   format.date "year" output.check
  929.   new.block
  930.   note output
  931.   fin.entry
  932. }
  933.  
  934. FUNCTION {unpublished}
  935. { output.bibitem
  936.   format.authors "author" output.check
  937.   after.authors
  938.   format.title "title" output.check
  939.   new.block
  940.   note "note" output.check
  941.   format.date output
  942.   fin.entry
  943. }
  944.  
  945. FUNCTION {default.type} { misc }
  946.  
  947. MACRO {jan} {"\btxmonjanlong{}"}
  948.  
  949. MACRO {feb} {"\btxmonfeblong{}"}
  950.  
  951. MACRO {mar} {"\btxmonmarlong{}"}
  952.  
  953. MACRO {apr} {"\btxmonaprlong{}"}
  954.  
  955. MACRO {may} {"\btxmonmaylong{}"}
  956.  
  957. MACRO {jun} {"\btxmonjunlong{}"}
  958.  
  959. MACRO {jul} {"\btxmonjullong{}"}
  960.  
  961. MACRO {aug} {"\btxmonauglong{}"}
  962.  
  963. MACRO {sep} {"\btxmonseplong{}"}
  964.  
  965. MACRO {oct} {"\btxmonoctlong{}"}
  966.  
  967. MACRO {nov} {"\btxmonnovlong{}"}
  968.  
  969. MACRO {dec} {"\btxmondeclong{}"}
  970.  
  971. MACRO {acmcs} {"ACM Computing Surveys"}
  972.  
  973. MACRO {acta} {"Acta Informatica"}
  974.  
  975. MACRO {cacm} {"Communications of the ACM"}
  976.  
  977. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  978.  
  979. MACRO {ibmsj} {"IBM Systems Journal"}
  980.  
  981. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  982.  
  983. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  984.  
  985. MACRO {ieeetcad}
  986.  {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  987.  
  988. MACRO {ipl} {"Information Processing Letters"}
  989.  
  990. MACRO {jacm} {"Journal of the ACM"}
  991.  
  992. MACRO {jcss} {"Journal of Computer and System Sciences"}
  993.  
  994. MACRO {scp} {"Science of Computer Programming"}
  995.  
  996. MACRO {sicomp} {"SIAM Journal on Computing"}
  997.  
  998. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  999.  
  1000. MACRO {tods} {"ACM Transactions on Database Systems"}
  1001.  
  1002. MACRO {tog} {"ACM Transactions on Graphics"}
  1003.  
  1004. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  1005.  
  1006. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  1007.  
  1008. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  1009.  
  1010. MACRO {tcs} {"Theoretical Computer Science"}
  1011.  
  1012. READ
  1013.  
  1014. STRINGS { longest.label }
  1015.  
  1016. INTEGERS { number.label longest.label.width }
  1017.  
  1018. FUNCTION {initialize.longest.label}
  1019. { "" 'longest.label :=
  1020.   #1 'number.label :=
  1021.   #0 'longest.label.width :=
  1022. }
  1023.  
  1024. FUNCTION {longest.label.pass}
  1025. { number.label int.to.str$ 'label :=
  1026.   number.label #1 + 'number.label :=
  1027.   label width$ longest.label.width >
  1028.     { label 'longest.label :=
  1029.       label width$ 'longest.label.width :=
  1030.     }
  1031.     'skip$
  1032.   if$
  1033. }
  1034.  
  1035. EXECUTE {initialize.longest.label}
  1036.  
  1037. ITERATE {longest.label.pass}
  1038.  
  1039. FUNCTION {begin.bib}
  1040. { preamble$ empty$
  1041.     'skip$
  1042.     { preamble$ write$ newline$ }
  1043.   if$
  1044.   "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  1045. }
  1046.  
  1047. EXECUTE {begin.bib}
  1048.  
  1049. EXECUTE {init.state.consts}
  1050.  
  1051. ITERATE {call.type$}
  1052.  
  1053. FUNCTION {end.bib}
  1054. { newline$
  1055.   "\end{thebibliography}" write$ newline$
  1056. }
  1057.  
  1058. EXECUTE {end.bib}
  1059.